<!--
 
 This file is part of EspGrid.  EspGrid is (c) 2012,2013 by David Ogborn.
 
 EspGrid is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation, either version 3 of the License, or
 (at your option) any later version.
 
 EspGrid is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with EspGrid.  If not, see <http://www.gnu.org/licenses/>.
 
 -->

<html>
    <head>
        <title>EspGrid</title>
    </head>
<body>

    <h1>Sharing Beats</h1>
        
        <div>EspGrid includes a simple (but flexible and controllable) system for generating synchronized sequences of numbered beats.  A key feature of the system (in keeping with the "decentralization" design principle) is that control of the system is available equally to all users running EspGrid on a given network.  If one user turns the beat on, it will be turned on for all.  Another user can then turn it off, and a third user can change the tempo or the number of beats in a bar.</div>
    
    <div>Control of the beat system takes two forms.  On the <a href="main.html">main tab</a> of the application there are controls for tempo (beats per minut), cycleLength (number of beats in a bar) and the on/off status of the beat system.  This method of control is often used in improvisation sessions.  A second method of control involves changing the settings of the beat system via OSC messages sent to a local EspGrid application (see <a href="osc.html">OSC</a>).  This method of control is more commonly used in fixed compositions.</div>
    
    <div>When a beat occurs, the following OSC message will be sent locally (i.e. to selected local applications as well as any other addresses/ports specified in Preferences):<br/>
        /esp/beat [n] [l] [d]<br/>
        where:<br/>
        n = the number of the beat, i.e. 1 for the first beat of a bar [type: int32]<br/>
        l = the number of beats in a bar [type: int32]<br/>
        d = the duration of a beat in seconds [type: float32]
    </div>
    
    <div>However, in practice, performers rarely deal with these OSC messages directly.  Instead, they use helper layers that bring the beat (and other shared) information into a convenient form.  For example, the Esp class (in esp.ck) uses the above OSC messages to provide ChucK events that "match" the desired position within the bar.</div>

</body>
</html>

